package com.yubest.designpattern.struct.proxy;

import lombok.AllArgsConstructor;

/**
 * 中介
 *
 * @Author: hweiyu
 * @Date: 2022/10/26 15:26
 */
@AllArgsConstructor
public class Mediator implements Tenant {

    private Tenant tenant;

    @Override
    public void findRoom() {
        System.out.println("Mediator -> find a room");
        tenant.findRoom();
        System.out.println("Mediator, Worker -> deal");
    }
}
